home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
prgtools
/
mint
/
lib
/
mntlib44.zoo
/
mntlib
/
mknod.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1993-10-12
|
318 b
|
21 lines
/* fake mknod -- this always fails */
#include <errno.h>
#include <support.h>
#include <stat.h>
int
mknod(path, mode, dev)
char *path;
int mode, dev;
{
if (S_ISDIR(mode)) {
return (mkdir(path, (mode_t) mode));
}
if (S_ISFIFO(mode)) {
return (mkfifo(path, (mode_t) mode));
}
errno = EINVAL;
return -1;
}